<html>
    <head>
        <meta charset="EUC-KR">
        <title>DoYouAD</title>
        <style type="text/css">
            html, body {
                margin: 0;
                padding: 0;
            }
        </style>
        <script>
            var AdBridge = window.AdBridge;
            function eventResult(e){
                if(e.origin === "http://cdn.doyouad.com"||e.origin === "https://cdn.doyouad.com"||e.origin === "http://ad.doyouad.com"||e.origin === "https://ad.doyouad.com"){
                    var result = "fail";
                    var msg = "";
                    var data = JSON.parse(e.data);
                    if(data.html != ""){
                        result = "success";
                    }else if(data["error"]){
                        msg = data["error"]
                    }else{
                        msg = "No Ads";
                    }
                    AdBridge.result(result, msg);
                }
            }
            function callScript(){
                if(window.attachEvent){
                    window.attachEvent('onmessage', eventResult);
                }else{
                    window.addEventListener('message', eventResult);
                };
            }
        </script>
    </head>
    <body onload="callScript();">
        <iframe
                src='https://ad.doyouad.com/html/apiIframe.html?PARAM_TEXT'
                width='AD_WIDTH'
                height='AD_HEIGHT'
                frameBorder='0'
                marginWidth='0'
                marginHeight='0'
                scrolling='no'/>
    </body>
</html>